<?php
/**
 * <https://y.st./>
 * Copyright © 2018 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'Colour',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<img src="/img/CC_BY-SA_4.0/y.st./weblog/2018/07/23.jpg" alt="A small patch of tiles remaining after the floor was ripped up" class="framed-centred-image" width="649" height="480"/>
<section id="Minetest">
	<h2>Minetest</h2>
	<p>
		I got a huge component of the <code>alchemic_palette</code> mod done today.
		This mod provides the alchemic, two-item recipes for when cotton is one of the two elements combined.
		What I got done today was the code to support combining coloured items in recipes without totally losing the colour data.
		Now, colours of the ingredients are averaged in the resulting item.
	</p>
	<p>
		I also think I&apos;ve gotten over one of my mental blocks with Minetest Game.
		I&apos;ve been treating it as a base game, to which things can be added, but from which nothing can be removed without totally redoing everything.
		I finally have plans to clean up one small part of Minetest Game while leaving the rest intact.
		Specifically, I wrote up a bunch of hacky code today and planned even more, in an effort to bridge the gap between Minetest Game&apos;s bizarre, legacy dye system and my own modern, excruciatingly-planned dye system.
		Minetest provides fifteen seemingly random colours, a couple being darker variants of other provided colours, but most colours not having alternate shades.
		The colour mixing doesn&apos;t make any sense either.
		It combines elements from RGB mixing, CYM mixing, the scientifically-invalid RYB mixing, and something else.
		Somehow, it&apos;s like these dyes are magic and follow different mixing rules based on what&apos;s convenient.
		And, like I said, the colours provided seem to be somewhat random.
		Anyway, I&apos;ve decided now to throw out this legacy dye system instead of hacking in compatibility with my own.
		I&apos;ll separate my own dye system from <code>alchemic_palette</code> and make it its own mod, called <code>palette</code>.
		This mod&apos;ll contain two items: a dye item and a cotton block node.
		It&apos;ll replace both the <code>dye</code> and <code>wool</code> mods, and be backwards-incompatible with them.
		I&apos;ll need to fork some other mods from Minetest Game to make them compatible with the new system, too.
		Specifically, <code>farming</code> and <code>beds</code> will definitely need to be forked and updated.
		Other mods may need this treatment as well.
	</p>
</section>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<p>
			That story sounds interesting, and it certainly brings up some questions, which are good for a mystery story.
			Why would the robbers not realise they&apos;d been had and decide to rob the place anyway once the guard admitted he&apos;d known they were robbers?
			Was the guard actually trying to help them when sending them to the tan pits?
			(This second question is answered in the ending, for those that are curious, though the first question is left unanswered.)
		</p>
		<p>
			Your modified version of the tale is kind of dark.
			I love it!
		</p>
	</blockquote>
</section>
END
);
